﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Cart.aspx.cs" Inherits="ProjectSem3.WebForm6" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div>
    <div class="show_title_details">
        <h7>My Cart</h7>
    </div>
    <div class="details_product">
        <table class="cart_table" border="1" width="100%">
            <tr class="cart_title">
                <td>
                    Option
                </td>
                <td>
                    Item pic
                </td>
                <td>
                    Product name
                </td>
                <td>
                    Unit price
                </td>
                <td>
                    Quantity
                </td>
                <td>
                    Total
                </td>
            </tr>
            <asp:Repeater ID="RepeaterCart" runat="server" 
                onitemdatabound="RepeaterCart_ItemDataBound">
                <ItemTemplate>
                    <tr>
                        <td>
                            <asp:LinkButton ID="LinkButtonDeleteItem" runat="server" OnClientClick="return confirm('are you sure?')"
                                OnClick="LinkButtonDeleteItem_Click">x</asp:LinkButton>
                            <asp:HiddenField ID="HiddenFieldProductID" runat="server" Value='<%# Eval("pro.ProductID")%>' />
                        </td>
                        <td>
                            <a href='<%# "Detail.aspx?id=" + Eval("pro.ProductID") %>'>
                                <asp:Image ID="imgcart" runat="server" width="30" border="0" />
                            </a>
                        </td>
                        <td>
                            <%# Eval("pro.Name")%>
                        </td>
                        <td>
                            <%# Eval("pro.Price")%>$
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxSoluong" runat="server" Text='<%# Eval("Quantity")%>' Width="30"></asp:TextBox>
                            <asp:Button ID="ButtonUpdateSoluong" runat="server" Text="Update" OnClick="ButtonUpdateSoluong_Click" />
                        </td>
                        <td>
                            <%# Convert.ToDecimal(Eval("pro.Price")) * Convert.ToInt32(Eval("Quantity")) %>$
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
            <tr>
                <td colspan="5" class="cart_total">
                    <span class="red">TOTAL:</span>
                </td>
                <td>
                    <asp:Label ID="LabelTotal" runat="server" Text=""></asp:Label>$
                </td>
            </tr>
        </table>
        <a href="./" class="continue">&lt; continue</a> 
        <a href="#" class="checkout" runat="server" id="AcheckOut" onserverclick="AcheckOut_Click">checkout &gt;</a>
    </div>
    <div style="clear: both;">
    </div>

        <div class="show">
            <div class="show_title">
                <asp:HyperLink ID="HyperLink3" runat="server" Font-Size="20px" ForeColor="White"
                    ViewStateMode="Inherit" NavigateUrl="#" Font-Strikeout="False" Font-Underline="false">New Mobile</asp:HyperLink>
            </div>
            <div class="show_contentTrangorder">
                <div id="amazingcarousel-container-1">
                        <div id="amazingcarousel-1" style="display: block; position: relative; width: 100%;
                            max-width: 720px; margin: 0px auto 0px;">
                            <div class="amazingcarousel-list-container" style="overflow: hidden;">
                                <ul class="amazingcarousel-list">
                                    <asp:Repeater ID="Repeater_Product" runat="server" OnItemDataBound="Repeater_Product_ItemDataBound">
                                        <ItemTemplate>
                                            <li class="amazingcarousel-item">
                                        <asp:HiddenField runat="server" ID="productID" Value='<%# Eval("ProductID") %>' />
                                        <div class="amazingcarousel-item-container">
                                            <div class="amazingcarousel-image">
                                                <a href='Detail.aspx?id=<%# Eval("ProductID") %>'>
                                                    <asp:Image ID="image" runat="server" />
                                            </div>
                                            <div class="amazingcarousel-title">
                                                <h3><%# Eval("Name") %></h3>
                                                <h3><cite class="price"><%# Eval("Price")%>₫</cite></h3>
                                            </div>
                                            <div class="amazingcarousel-description">
                                            </div>
                                        </div>
                                    </li>
                                        </ItemTemplate>
                                    </asp:Repeater>                                    
                                </ul>
                            </div>
                            <div class="amazingcarousel-prev">
                            </div>
                            <div class="amazingcarousel-next">
                            </div>
                        </div>
                    </div>
            </div>
        </div>
        <div style="clear: both;margin-bottom:100px;">
        </div>
    </div>
</asp:Content>
